package br.com.salao.model;

import javax.persistence.EntityManager;

import br.com.salao.bean.DiaSemana;
import br.com.salao.dao.DiaSemanaDao;
import br.com.salao.dao.DiaSemanaDaoImpl;
import br.com.salao.util.JpaUtil;

public class DiaSemanaModel {
	
	private EntityManager em;

	public DiaSemanaModel(){
		em = JpaUtil.getEntityManager();	
	}
	
	public DiaSemana incluir(DiaSemana diaSemana){
		DiaSemanaDao diaSemanaDao = new DiaSemanaDaoImpl(em);
		return diaSemanaDao.inserir(diaSemana);
	}
	
	public DiaSemana update(DiaSemana diaSemana){
		DiaSemanaDao diaSemanaDao = new DiaSemanaDaoImpl(em);
		return diaSemanaDao.update(diaSemana);
	}

	public DiaSemana buscarDiaSemanaPorIdEstabelecimentos(int idEstabelecimento){
		DiaSemanaDao diaSemanaDao = new DiaSemanaDaoImpl(em);
		return diaSemanaDao.buscarDiaSemanaPorIdEstabelecimentos(idEstabelecimento);
	}
	
}
